<template>

  <el-select v-model="selectId" clearable @change="selectChange" placeholder="请选择">
    <el-option
      v-for="item in options"
      :key="item.id"
      :label="item.name"
      :value="item.id"
    />
  </el-select>

</template>
<script>

  import {
      appListApi
  } from '@/api/business/app'

  export default {
    props: ['value'],
    data() {
      return {
        selectId:"",
          options: []
      }
    },
    created() {
      this.selectId = this.value;
      var query = {
          pageNum: 1,pageSize: 10000
      };
      appListApi(query).then(response => {
        this.options = response.rows
      })
    },
    methods: {
      selectChange() {
        this.$emit('update:value', this.selectId)
      }
    }
  }
</script>

<style rel="stylesheet/scss" lang="scss" scoped>

</style>
